
<!DOCTYPE html>
<html lang="CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>index</title>
    <style>
        html{
            height: 100%;
            box-sizing: border-box;
            min-width: 640px;
            height: 100%;
            margin: 0 auto;
            padding: 0;
            display: flex;
            background-color: #333;
        }
        body {
            box-sizing: border-box;
            width: 640px;
            height: 1030px;
            margin: 0 auto;
            padding: 0;
            background-image: url("./image/yrybj.png");
            background-repeat: no-repeat;
            background-size: cover;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .text {
            text-align: center;
            opacity: 0; /* 初始设置透明度为0 */
            animation: fadeIn 2s forwards; /* 添加动画 */
            position: absolute;
            top: 300px ;
            color: #663300; 
        }
        .text p { 
            margin-top: 50px;

        }
        @keyframes fadeIn {
            to {
                opacity: 1; /* 2秒后透明度渐变为1 */
            }
        }
        .container {
            width: 640px;
            height: 1030px;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            justify-content:center;
            align-items: center;
        }

        .image {
            position: absolute;
            top: 50%;
            width: 500px;
            height: 500px;
            transition: all 0.5s;
            animation-duration:2s;
            animation-timing-function: ease;
            animation-fill-mode: forwards;
        }

        .left-image {
            top:400px ;
            right: calc(43%);
            animation-name: moveLeft;
        }

        .right-image {
            top: 0px;
            left: calc(43%);
            animation-name: moveRight;
        }

        @keyframes moveLeft {
            0% {
                transform: translateX(0);
            }
            100% {
                transform: translateX(-300px);
            }
        }

        @keyframes moveRight {
            0% {
                transform: translateX(0);
            }
            100% {
                transform: translateX(300px);
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <img src="image/left-image.png" alt="Left Image" class="image left-image">
        <img src="image/right-image.png" alt="Right Image" class="image right-image">
    </div>
    <div class="text">
        <p>宋 运</p>
        <p>带你走进一场宋朝运动会</p>
    </div>
    <script>
     window.onload = function() {
        setTimeout(function() {
            window.location.href = 'juanzhou.html'
        }, 5000); 
    };
        setTimeout(function() {
            document.querySelector('.left-image').style.animationPlayState = 'running';
            document.querySelector('.right-image').style.animationPlayState = 'running';
        }, 2000);
        setTimeout(function() {
            document.querySelector('.text').style.opacity = 1; /* 1秒后将文字透明度设置为1 */
        }, 1000);
    </script>
</body>
</html>
